package com.zm.application.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zm.application.controller.bean.TestUserBean;
import com.zm.application.controller.mapper.IuserMapper;
@Controller
@EnableAutoConfiguration
@ComponentScan(basePackages={"com.zm"})//添加的注解
public class HelloController{
	
	@Autowired//依赖注入
	IuserMapper usermap;
	
	@RequestMapping("/word")
	public String sayHello() {
		return"index";
	}
	@ResponseBody
	@RequestMapping("/search")
	public List<TestUserBean> searchUser(){
		System.out.println("sssss");
		List<TestUserBean> list=null;
		list=usermap.queryUser();
		return list;
	}

}
